#include <bits/stdc++.h>
using namespace std;

#include <bits/extc++.h>
using namespace __gnu_pbds;

using Real = long double;
using llt = long long;
using vi  =vector<int>;
using pii = pair<int, int>;


int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase = 1;
    // cin >> nofkase;
    while(nofkase--){
        int n; string a, b;
        cin >> n >> a >> b;
        int ans = 0;
        for(int i=0;i<n;++i){
            if(a[i] == 'Y'){
                if(b[i] == 'Y') ans += 3;
                else ans += 2;
            }else{
                if(b[i] == 'Y') ans += 2;
                else ans += 0;
            }
        }
        cout << ans << "\n";
    }
    return 0;
}